# powershell 字符串转移字符是 `
Write-Host "replacecode add a function initWasm`(`) forinit" -ForeGroundColor green 
$file = Get-Content ".\libWasm.js"
# 但replace 第一个参数是正则表达式，转义字符是\ 注意区别
$file = $file -Replace "^\s*createWasm\(\)\;" , "export function wasm_init()`n{`n    createWasm();"
$file = $file -Replace "^\s*run\(\)\;" , "    run();`n`}"
$file = $file +"export function wasm_hasInit()`n{`n    return runtimeInitialized;`n`n}"
$file = $file +"export function wasm_getImports()`n{`n    return wasmImports;`n`n}"
$file = $file +"export function wasm_getExports()`n{`n    return wasmExports;`n`n}"
$file | Set-Content ".\libWasm.js"